# Copyright 1999-2011 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: $

EAPI=4

inherit waf-utils vala-utils

SRC_URI="http://jpdeplaix.free.fr/downloads/${P}.tar.bz2"
DESCRIPTION="ValaTerm is a lightweight terminal written in Vala"
HOMEPAGE="http://gitorious.org/valaterm/"

LICENSE="GPL-3"
SLOT="0"
DOCS="AUTHORS README INSTALL NEWS ChangeLog TODO COPYING"
KEYWORDS="~amd64 ~x86"
IUSE="nls debug gtk3"

RDEPEND=">=dev-libs/glib-2.14:2
	!gtk3? ( >=x11-libs/gtk+-2.16:2
		   >=x11-libs/vte-0.20:0 )
	gtk3? ( >=x11-libs/gtk+-3.0:3
		  >=x11-libs/vte-0.20:2.90 )"

DEPEND="${RDEPEND}
	nls? ( sys-devel/gettext
		 dev-util/intltool )
	dev-util/pkgconfig"

if use gtk3; then
	VALAC_MIN_VERSION="0.13.2"
else
	VALAC_MIN_VERSION="0.10"
fi

src_configure() {
	conf=""
	use nls || conf="${conf} --disable-nls"
	use debug && conf="${conf} --debug"
	use gtk3 && conf="${conf} --with-gtk3"

	waf-utils_src_configure ${conf}
}
